package com.hangxin.commons.aspect.impl;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.hangxin.commons.aspect.AspectOperation;


/**
 * @author fq
 * 
 * 异常日志
 *
 */
@Component
@Aspect
public class AspectOperationImpl implements AspectOperation{
	
	static final Logger logger = LoggerFactory
	.getLogger(AspectOperationImpl.class);
		
	@AfterThrowing( pointcut="execution(* com.hangxin.*.*.*.*(..))",throwing="ex")
    public void runtimeError(JoinPoint joinPoint,RuntimeException ex) {           
        logger.info("调用者:"+joinPoint.getTarget());
        logger.info("异常:"+ex);  

    }
}
